Optimal. Leaf size=34 \[ \frac {4 x}{\sqrt {3}}-x+\frac {8 \tan ^{-1}\left (\frac {\cos (x)}{\sin (x)+\sqrt {3}+2}\right )}{\sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2735, 2657} \[ \frac {4 x}{\sqrt {3}}-x+\frac {8 \tan ^{-1}\left (\frac {\cos (x)}{\sin (x)+\sqrt {3}+2}\right )}{\sqrt {3}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2657
Rule 2735
Rubi steps
\begin {align*} \int \frac {2-\sin (x)}{2+\sin (x)} \, dx &=-x+4 \int \frac {1}{2+\sin (x)} \, dx\\ &=-x+\frac {4 x}{\sqrt {3}}+\frac {8 \tan ^{-1}\left (\frac {\cos (x)}{2+\sqrt {3}+\sin (x)}\right )}{\sqrt {3}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 28, normalized size = 0.82 \[ \frac {8 \tan ^{-1}\left (\frac {2 \tan \left (\frac {x}{2}\right )+1}{\sqrt {3}}\right )}{\sqrt {3}}-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.44, size = 27, normalized size = 0.79 \[ \frac {4}{3} \, \sqrt {3} \arctan \left (\frac {2 \, \sqrt {3} \sin \relax (x) + \sqrt {3}}{3 \, \cos \relax (x)}\right ) - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.36, size = 51, normalized size = 1.50 \[ \frac {4}{3} \, \sqrt {3} {\left (x + 2 \, \arctan \left (-\frac {\sqrt {3} \sin \relax (x) - \cos \relax (x) - 2 \, \sin \relax (x) - 1}{\sqrt {3} \cos \relax (x) + \sqrt {3} - 2 \, \cos \relax (x) + \sin \relax (x) + 2}\right )\right )} - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 24, normalized size = 0.71 \[ \frac {8 \sqrt {3}\, \arctan \left (\frac {\left (1+2 \tan \left (\frac {x}{2}\right )\right ) \sqrt {3}}{3}\right )}{3}-x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.22, size = 36, normalized size = 1.06 \[ \frac {8}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (\frac {2 \, \sin \relax (x)}{\cos \relax (x) + 1} + 1\right )}\right ) - 2 \, \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 7.83, size = 36, normalized size = 1.06 \[ -x-\frac {8\,\sqrt {3}\,\mathrm {atan}\left (-\frac {\sqrt {3}\,\mathrm {tan}\left (\frac {x}{2}\right )-\sqrt {3}}{3\,\mathrm {tan}\left (\frac {x}{2}\right )+3}\right )}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.88, size = 42, normalized size = 1.24 \[ - x + \frac {8 \sqrt {3} \left (\operatorname {atan}{\left (\frac {2 \sqrt {3} \tan {\left (\frac {x}{2} \right )}}{3} + \frac {\sqrt {3}}{3} \right )} + \pi \left \lfloor {\frac {\frac {x}{2} - \frac {\pi }{2}}{\pi }}\right \rfloor \right )}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________